package top.byteio.common.core.enums.user;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum UserType {
    USER("USER", "普通用户"),

    ADMIN("INTERNAL", "内部用户"),

    ROOT("ROOT", "最高权限用户");

    private final String name;

    private final String info;

    public static  UserType getUserType(String name) {
        for (UserType value : UserType.values()) {
            if (value.name.equals(name)) {
                return value;
            }
        }

        return null;
    }

}
